package com.worldcup.model.dto.question;

import com.worldcup.model.User;
import com.worldcup.model.question.QuestionMatchResult;
import com.worldcup.model.question.UserFriend;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @author duwan.zq
 * @date 2019/04/04
 */
@Data
public class MatchResultDetailDTO {

    private String openid;

    private String imgUrl;

    private String friendOpenid;

    private String friendImgUrl;

    private Integer matchType;

    private String matchTypeName;

    private BigDecimal harmonyScore;

    private BigDecimal topicScore;

    private String commonIdol;

    private String commonEnemy;

    private String commonMatch;

    public MatchResultDetailDTO(QuestionMatchResult matchResult, User user, User friend){
        this.openid = user.getOpenid();
        this.imgUrl = user.getImgurl();
        this.friendOpenid = friend.getOpenid();
        this.friendImgUrl = friend.getImgurl();
        this.matchType = matchResult.getMatchType();
        this.harmonyScore = matchResult.getHarmonyScore();
        this.topicScore = matchResult.getTopicScore();
        this.commonIdol = matchResult.getCommonIdol();
        this.commonEnemy = matchResult.getCommonEnemy();
        this.commonMatch = matchResult.getCommonMatch();
    }

}
